/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.webaccess.retailws.Delegate;

import com.webaccess.retailws.Bean.PaymentBean;
import com.webaccess.retailws.DAO.PaymentDAO;
import java.util.LinkedHashMap;

/**
 *
 * @author Owner
 */
public class PaymentDelegate {

    PaymentDAO payDAO = null;
    ProductDelegate prodDelegate = null;

    public PaymentDelegate() {
        payDAO = new PaymentDAO();
        prodDelegate = new ProductDelegate();
    }

    public PaymentBean getPaymentDelivery(Long cartId) {
        return payDAO.getPaymentDelivery(cartId);
    }

    public Long getCartId(Long userId,Long orderId) {
        return prodDelegate.getCartId(userId,orderId);
    }

    public Long savePaymentDelivery(PaymentBean payBean, Long userId) {
        return payDAO.savePaymentDelivery(payBean, userId);
    }

    public Long getPaymentType(Long paymentId) {
        return payDAO.getPaymentType(paymentId);
    }

    public Long saveOrder(Long userId, Long paymentId, Long cartId, String paydelTotal) {
        return payDAO.saveOrder(userId, paymentId, cartId, paydelTotal);
    }

    public LinkedHashMap getBankLHMap() {
        return payDAO.getBankLHMap();
    }

    public LinkedHashMap getCardTypeLHMap() {
        return payDAO.getCardTypeLHMap();
    }

    public PaymentBean getOrder(Long userId, Long paymentId, Long cartId) {
        return payDAO.getOrder(userId, paymentId, cartId);
    }

    public boolean savePaymentCard(PaymentBean payBean, Long orderId, Long cartId) {
        return payDAO.savePaymentCard(payBean,orderId,cartId);
    }

    public boolean savePaymentBank(PaymentBean payBean, Long orderId, Long cartId) {
        return payDAO.savePaymentBank(payBean,orderId,cartId);
    }

    public boolean savePaymentCash(Long orderId, Long cartId) {
        return payDAO.savePaymentCash(orderId,cartId);
    }

    public boolean cancelOrder(Long orderId, Long cartId) {
        return payDAO.cancelOrder(orderId,cartId);
    }

    public PaymentBean[] getUserOrders(Long userId) {
        return payDAO.getUserOrders(userId);
    }

    public PaymentBean getOrderDetail(Long orderId) {
        return payDAO.getOrderDetail(orderId);
    }

    public PaymentBean[] getAllOrders() {
        return payDAO.getAllOrders();
    }

    public LinkedHashMap getOrderStatusLHMap() {
        return payDAO.getOrderStatusLHMap();
    }

    public boolean updateOrderStatus(Long orderId, Long orderStatusId,Long cartId) {
        return payDAO.updateOrderStatus(orderId,orderStatusId,cartId);
    }

    
}
